package com.sunjob.mromessage.mapper;

import com.sunjob.common.domain.loginServer.SysUser;
import com.sunjob.common.domain.message.SysNotice;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Wangzurong
 * @create 2022-08-05 15:40
 */
@Mapper
@Component
public interface MroNoticeMapper {
    void saveNotice(SysNotice sysNotice);

    List<SysNotice> pullNoticeByUserId(Map<String,Object> sysUser);

    List<SysNotice> findAllNotice();

    List<SysNotice> findAllAnnouncement();

    List<SysNotice> findAllInform();

    SysNotice queryAnnouncementOrInformById(long notice_id);

    List<SysNotice> queryAnnouncementOrInformByCreator(String Creator);

    //根据标题、类型、创建者、更新者 搜索
    List<SysNotice> queryNoticeBy(SysNotice sysNotice);

    //根据id更新内容, 除id，创建时间，status外，不能都为null
    Integer updateNotice(SysNotice sysNotice);

    void deleteNoticeById(Long noticeId);

}